home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 401-425 / disk_415 / uedit / config!p < prev    next >
Text File  |  1992-05-06  |  8KB  |  306 lines

  1. ======== PRINTER CMDS ========
  2.  
  3. Print the hilite region.  (See alt-p.)
  4. <ctl-p: print(curFile,hilite) >
  5.  
  6. Select printing port:  parallel, serial, Preferences raw or processed.
  7. <alt-p:
  8.     putMsg("Printer select: 0=par: 1=ser: 2=prt: 3=prt: (raw)")
  9.     getKeyVal(macroNum,inputChar)
  10.     sub(n54,inputChar,"0")
  11.     if (geNum(n54,0) & gtNum(4,n54)) equateNum(prefPrint,n54)
  12.     putMsg(" ") >
  13.  
  14. Print entire document
  15. <altCtl-p: print(curFile,all)>
  16.  
  17. Stop the current print
  18. <lAmiga-a: abortPrint abort>
  19.  
  20. Stop all prints that are stored up
  21. <rAmiga-a:
  22.     while (abortPrint) nothing
  23.     abort >
  24.  
  25. Restart current print
  26. <lAmiga-s: restartPrint>
  27.  
  28. Give printer control code help
  29. <shftAltCtl-p:
  30.     freebuf(buf54)
  31.     putMsg(" ")
  32.     insertRgn(buf54,sFile,
  33. "Press lAmiga-p and then one of the letters below.  For boldface, italics,
  34. 8 lines/inch, etc, the hilite region is bracketed with printer codes:
  35.  
  36. i = italics
  37. u = underline
  38. b = boldface
  39. c = condensed
  40. e = elite
  41. l = enlarged
  42. s = shadow
  43. d = double strike
  44. n = NLQ
  45. x = superscript
  46. y = subscript
  47. 8 = 8 lines/inch
  48.     Other keys:
  49.         rAmiga-g = find next printer code in document
  50.         lAmiga-g = input a printer code # (0-75.  See table in Manual.)
  51. \"Print select\" must be 2 or 3 for these codes to control your printer.
  52. Select \"Show vals\" to see what print-select is.  Select your printer in
  53. Preferences.
  54.  
  55. ",all)
  56.     flipFlag(buf54,readOnly)
  57.     equateNum(n53,curFile)
  58.     editBuf(buf54)
  59.     vScroll(sFile)
  60.     updateDisplay
  61.     getKey(n54)
  62.     editBuf(buf[n53])
  63.     .. updateDisplay
  64.     freeBuf(buf54) >
  65.  
  66. Get a key and reduce it to lower case.
  67. <virtual-g:
  68.     putMsg("Enter prtr code (b c d e i l n s u x y 8 h=help):")
  69.     if (getKey(n54)) { mod(n54,n54,104) putMsg(" ") returnTrue }
  70.     putMsg(" ")
  71.     returnFalse >
  72.  
  73. Bracket the hilite region with printer codes using n54
  74. <virtual-c:
  75.     if (geLoc(curFile,sHilite,eHilite)) returnFalse
  76.     equateLoc(curFile,locA,atCursor)
  77.     moveCursor(curFile,sHilite)
  78.     .. the line below appears to be needed in some cases when the
  79.     .. code is embedded at start of line.  Without it the printer
  80.     .. may not receive the code.
  81.     if (is(curFile,sLine)) insertChar(curFile,13)
  82.     printerCode(curFile,n53,0,0)
  83.     incNum(n53)
  84.     moveCursor(curFile,eHilite)
  85.     printerCode(curFile,n53,0,0)
  86.     equateLoc(curFile,eHilite,atCursor)
  87.     moveCursor(curFile,locA) >
  88.  
  89. Printer codes:  Next letter key brackets hilite for boldface, italics etc.
  90. <lAmiga-p:
  91.     if (runKey(virtual-g)) {
  92.         if (eqNum(n54,normal-h)) runKey(shftAltCtl-p)
  93.         else {
  94.             switch (n54) {
  95.                 case(normal-8) { equateNum(n53,55) }
  96.                 case(normal-i) { equateNum(n53,6) }
  97.                 case(normal-u) { equateNum(n53,8) }
  98.                 case(normal-b) { equateNum(n53,10) }
  99.                 case(normal-e) { equateNum(n53,15) }
  100.                 case(normal-c) { equateNum(n53,17) }
  101.                 case(normal-l) { equateNum(n53,19) }
  102.                 case(normal-s) { equateNum(n53,21) }
  103.                 case(normal-d) { equateNum(n53,23) }
  104.                 case(normal-n) { equateNum(n53,25) }
  105.                 case(normal-x) { equateNum(n53,27) }
  106.                 case(normal-y) { equateNum(n53,29) }
  107.                 default { returnFalse }
  108.             }
  109.             runKey(virtual-c)
  110.         }
  111.     } >
  112.  
  113. Find next printer code (can delete it with ctl-h)
  114. <rAmiga-g:
  115.     freeBuf(buf54)
  116.     insertChar(buf54,"")
  117.     insertChar(buf54,wildCard)
  118.     insertChar(buf54,"")
  119.     insertChar(buf54,eitherOr)
  120.     insertChar(buf54,"")
  121.     insertChar(buf54,wildCard)
  122.     insertChar(buf54,wildCard)
  123.     insertChar(buf54,"")
  124.     setSearch(buf54)
  125.     if (search(curFile,sInvert,eInvert,1))
  126.     putMsg("Press ctl-i to delete the code") >
  127.  
  128. Insert printer code.  (See printer code table for meaning of numbers 0-75.)
  129. <lAmiga-g:
  130.     putMsg("Enter printer code (0-75, see printer-codes):")
  131.     equateNum(n53,0)
  132.     equateNum(n52,0)
  133.     if (inputNum(n54) & geNum(n54,0) & geNum(75,n54)) {
  134.         switch(n54) {
  135.             case(12) {
  136.                 putMsg("Enter foreground color (30-39)")
  137.                 goto label(2) }
  138.             case(13) {
  139.                 putMsg("Enter background color (40-49)")
  140.                 goto label(2) }
  141.             case(48) {
  142.                 putMsg("Enter proportional offset")
  143.                 goto label(2) }
  144.             case(57) {
  145.                 putMsg("Enter form length")
  146.                 goto label(2) }
  147.             case(58) {
  148.                 putMsg("Enter # lines to skip on perforation")
  149.                 goto label(2) }
  150.             case(64) {
  151.                 putMsg("Top/bottom margins, enter top margin")
  152.                 }
  153.             case(65) {
  154.                 putMsg("Left/right margins, enter left margin")
  155.                 }
  156.             case(75) {
  157.                 putMsg("Extended command - enter arg value")
  158.                 goto label(2) }
  159.             default { goto label(1) }
  160.         }
  161. label(3)
  162.         if (not inputNum(n52)) return
  163.         putMsg("Enter next value")
  164. label(2)
  165.         if (not inputNum(n53)) return
  166. label(1)
  167.         printerCode(curFile,n54,n52,n53)
  168.     } >
  169.  
  170. ======== PAGING CMDS ======
  171.  
  172. Erase next page number
  173. <lAmiga-y:
  174.     if (not is(curFile,eForm)) movecursor(curFile,eForm)
  175.     if (is(curFile,12)) return
  176.     if (not is(curFile,eLine)) moveCursor(curFile,eLine)
  177.     if (is(curFile,12)) runKey(alt-kp7)
  178. >
  179.  
  180. Input page number to go to
  181. <alt-3:
  182.     putMsg("Go to page #:")
  183.     if (inputNum(n3)) gotoPage(curFile,n3) >
  184.  
  185. Insert a formfeed character
  186. <lAmiga-f: insertChar(curFile,12) >
  187.  
  188. Go to top of page
  189. <lAmiga-h: moveCursor(curFile,sForm) >
  190.  
  191. Go to end of page
  192. <lAmiga-b: moveCursor(curFile,eForm) >
  193.  
  194. Insert page-division at cursor
  195. <lAmiga-v:
  196.     if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  197.     getPageRowCol(n50,n51,n52)
  198.     getLocal(curFile,n53,bottomMargin)
  199.     getLocal(curFile,n49,pageLines)
  200.     if (gtNum(2,n49)) {
  201.         putMsg("Must set lines/page > 1 first")
  202.         returnFalse
  203.     }
  204.     div(n53,n53,2)
  205.     add(n51,n51,n53)
  206.     while (gtNum(n49,n51)) { incNum(n51) insertChar(curFile,eLine) }
  207.     getLocal(curFile,n49,lineLength)
  208.     div(n49,n49,2)
  209.     while (gtNum(n49,0)) { insertChar(curFile," ") decNum(n49) }
  210.     toWord(curFile,n50)
  211.     insertChar(curFile,12)
  212.     if (not is(curFile,eFile)) {
  213.         getLocal(curFile,n54,topMargin)
  214.         while (gtNum(n54,0)) { decNum(n54) insertChar(curFile,eLine) }
  215.     }
  216. >
  217.  
  218. Delete next page-division
  219. <lAmiga-d:
  220. label(1)
  221.     if (not is(curFile,sForm)) moveCursor(curFile,sForm)
  222.     if (not is(curFile,eForm)) moveCursor(curFile,eForm)
  223.     if (not is(curFile,eLine)) moveCursor(curFile,eline)
  224.     if (not is(curFile,12)) {
  225.         moveCursor(curFile,eChar)
  226.         if (not is(curFile,eFile)) goto label(1)
  227.         returnFalse
  228.     }
  229.     if (not is(curFile,sLine)) moveCursor(curFile,sLine)
  230.     getPageRowCol(n49,n50,n51)
  231.     getLocal(curFile,n54,topMargin)
  232.     getLocal(curFile,n53,bottomMargin)
  233.     equateLoc(curFile,locA,atCursor)                      .. start of ff line
  234.     moveCursor(curFile,downLine)
  235.     while (gtNum(n54,0)) {                                    .. del tm lines
  236.         if (not is(curFile,blankLine)) goto label(2)
  237.         decNum(n54)
  238.         moveCursor(curFile,downLine)
  239.     }
  240. label(2)
  241.     equateLoc(curFile,locB,atCursor)
  242.     equateLoc(curFile,atCursor,locA)
  243.     moveCursor(curFile,upLine)
  244.     while (gtNum(n50,0)) {
  245.         decNum(n50)
  246.         if (not is(curFile,blankLine)) {
  247.             moveCursor(curFile,downLine)
  248.             goto label(3)
  249.         }
  250.         moveCursor(curFile,upLine)
  251.     }
  252. label(3)
  253.     equateLoc(curFile,locA,atCursor)
  254.     clearRgn(curFile,loc) >
  255.  
  256. Auto-insert page-divisions and page-numbers in document
  257. <lAmiga-r:
  258.     putMsg("Scanning")
  259.     equateLoc(curFile,locA,atCursor)
  260.     freeBuf(buf54)
  261.     insertChar(buf54,12)
  262.     setSearch(buf54)
  263.     if (search(curFile,sInvert,eInvert,1)) {
  264.         putMsg("Delete old paging divisions first using lAmiga-d")
  265.         returnFalse
  266.     }
  267.     putMsg(" ")
  268.     equateLoc(curFile,atCursor,locA)
  269.     if (not is(curFile,sForm)) moveCursor(curFile,sForm)
  270.     while (nothing) {
  271.         moveCursor(curFile,eForm)
  272.         getLocal(curFile,n53,bottomMargin)
  273.         getPageRowCol(n50,n51,n52)
  274.         getLocal(curFile,n52,pageLines)
  275.         if (gtNum(2,n52)) {
  276.             putMsg("Must set lines/page > 1 first")
  277.             returnFalse
  278.         }
  279.         if (gtNum(n52,n51)) {                            .. last page is short
  280.             sub(n55,n52,n51)                        .. page lines - real line
  281.             while (gtNum(n52,n51)) {
  282.                 insertChar(curFile,eLine)
  283.                 incNum(n51)
  284.             }
  285.             do (n54,1,n53)  moveCursor(curFile,upLine)
  286.             runKey(lAmiga-v)
  287.             if (not is(curFile,eFile)) {
  288.                 moveCursor(curFile,eFile)
  289.                 runKey(lAmiga-v)
  290.             }
  291.             return
  292.         }
  293.         do (n54,1,n53)  moveCursor(curFile,upLine)
  294.         equateNum(n54,1)
  295.         while (is(curFile,blankLine)) {
  296.             moveCursor(curFile,downLine)
  297.             incNum(n54)
  298.             if (geNum(n54,n53)) goto label(1)
  299.         }
  300.         label(1)
  301.         runKey(lAmiga-v)
  302.         moveCursor(curFile,downLine)
  303.         updateDisplay
  304.     } >
  305.  
  306.